count (one's) chickens before they hatch

Translations
vendre la peau de l'ours avant de l'avoir tué
Definitions
To assume or expect something positive will happen before it actually does, often leading to disappointment if things don't go as planned. The phrase warns against making plans based on future events that are not guaranteed.